package com.sn.author.controller;

import com.sn.author.domain.BaseResult;
import com.sn.author.domain.dto.VideoDTO;
import com.sn.author.domain.vo.PageVo;
import com.sn.author.service.dao.AttentionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author xiaom
 * @Date 2020/9/17 16:29
 * @Version 1.0.0
 * @Description <>
 **/
@RestController
@RequestMapping(value = "/attention")
@Api(tags = "关注")
public class AttentionController {

    private final AttentionService attentionService;


    public AttentionController(AttentionService attentionService) {
        this.attentionService = attentionService;
    }

    @PostMapping("/list")
    @ApiOperation("获取导入的视频列表")
    public BaseResult<List<VideoDTO>> list(@RequestBody PageVo pageVo){
        return attentionService.list(pageVo);
    }

}
